Computers generally are programmed using computer languages. Code written in most computer languages must first be compiled. This process of compilation breaks human-readable source code in the computer language into low-level instructions and can be in the form of an executable. This executable can then be run on a computer (typically on a specific platform) for the desired effect. The process of compilation is done by an application known as a compiler.
Tools such as editors or visual design tools exist which assist users in writing code. These tools may be graphics-based or text-based, and can include on-the-fly syntax checking and background compilation, among other benefits for users.
Computer languages may be specialized. Some languages are general purpose programming languages (GPLs). These may include languages geared towards specific applications. For example, several computer languages exist which are directed towards mathematical and statistical applications. These include Fortran, C, Ada, COBOL, LISP, Pascal, Prolog, BASIC, C++, C#, Java, among other languages. Additionally, several computer languages exist which are directed towards business applications. These include languages such as BPEL4WS (Business Process Execution Language for Web Services) and XLang. Each language may have specific advantages and capabilities for performing the specialized functions to which they are addressed. Additionally, editors for each language may provide assistance specialized for the function of the language.
Additionally, languages may also be domain specific languages. For example, XML-based domain specific languages including BPEL (business process execution languages), which is a language used to describe and execute business processes. XSLT, XSD, and XQuery are other examples of XML-based domain specific languages.
It can be seen that because of the different advantages and capabilities of the different languages, it may be useful to combine the advantages and capabilities of one language with the advantages and capabilities of a second language.
One way to do this is to use a first language to create a first executable, and a second language to create a second executable. Some result file of the first executable may be used by the second executable. However, this solution has obvious limitations. First, in this solution, a strict ordering is imposed from an outside source on the interchange between the two executables. While it may be possible to run a series of executables written in different languages, the order of running the executables is imposed from outside of the executables, and the exchange of data may not be performed in a way which is efficient for the executables. Additionally, only a result file is exchanged between executables, the functionality of one executable is not accessible by any other executable. This severely limits the usefulness of this solution.
Another possible solution is to create a customized compiler which allows the use of code from a second language within a program written in a first language. The customized compiler can compile code in the first language, can recognize when a second language has been used, and can compile the code in the second language in order to create a unified executable. For example, some customized C compilers can recognize the use of code in the assembly language and can compile the assembly language code along with the C language code in creating an executable.
This solution also has disadvantages. First, a customized compiler must be created for each combination of languages which may be used. This will involve significant time and resource expenditure for each new combination which is required. Second, the customized nature of the compiler hinders the extensibility of the compiler to include a new language. Additionally, a customized editor must also be created, or editor functionality will not be provided to users.
Thus, there is a need for a solution which overcomes these and other drawbacks of prior art compilers.